package com.jblog.core.service.facde;

import java.util.List;

import com.jblog.common.page.Pagination;
import com.jblog.core.model.blog.Category;
import com.jblog.core.model.blog.Comment;
import com.jblog.core.model.blog.Post;
import com.jblog.core.model.blog.Tag;
import com.jblog.core.model.blog.archive.PostCalendarArchive;
import com.jblog.core.model.blog.param.CategoryParam;
import com.jblog.core.model.blog.param.CommentParam;
import com.jblog.core.model.blog.param.PostParam;
import com.jblog.core.model.blog.param.TagParam;

public interface BlogFacade {
    
    /**** PostService ****/
    public Post findPostById(Long id);
    
    public Post findPostByAlisa(String alias);
    
    public List<Post> findPostByParam(PostParam p);

    public Pagination findPostByParamByPage(PostParam p);
    
    public List<Post> findPreviousAndNextOfPost(PostParam p);
    
    public Long findCountOfPost(PostParam p);

    public Long findMaxIdOfPost();
    
    public void savePost(Post e);
    
    public void updatePost(Post e);
    
    public void enDisablePost(Post e, boolean able);
    
    public void deletePost(Long id);
    
    /**** TagService ****/
    public Tag findTagById(Long id);

    public List<Tag> findTagByPostId(Long id);
    
    public Tag findTagByAlisa(String s);
    
    public List<Tag> findTagByParamByPage(TagParam p);
    
    public Long findCountOfTag(TagParam p);
    
    public void enDisableTag(Tag e, boolean able);
    
    public void saveTag(Tag e);
    
    public void updateTag(Tag e);
    
    public void deleteTag(Long id);
    
    /**** CatalogService ****/
    public Category findCategoryById(Long id);
    
    public Category findCategoryByAlisa(String s);
    
    public List<Category> findCategoryByParamByPage(CategoryParam p);
    
    public List<Category> findAllCategory(CategoryParam p);
    
    public void enDisableCategory(Category e, boolean able);
    
    public void saveCategory(Category e);
    
    public void updateCategory(Category e);
    
    public void deleteCategory(Long id);
    
    /**** CommentService ****/
    public Comment findCommentById(Long id);
    
    public List<Comment> findCommentByPostId(Long id);
    
    public List<Comment> findCommentByParam(CommentParam p);
    
    public Pagination findCommentByParamByPage(CommentParam p);
    
    public Long findCountOfComment(CommentParam p);
    
    public void enDisableComment(Comment e, boolean able);
    
    public void saveComment(Comment e);
    
    public void updateComment(Comment e);
	
    /**** ArchiveService ****/
    public List<PostCalendarArchive> findCalendarArchiveOfPost();
    
}
